export function getToday() {
  let date = new Date();
  let year = date.getFullYear();
  let month = date.getMonth() + 1;
  let day = date.getDate();

  let completeDay = `${year}-${("0" + month).slice(-2)}-${("0" + day).slice(
    -2
  )}`;
  return {
    year,
    month,
    day,
    completeDay,
  };
}

export function getCurrentTime() {
  let date = new Date();
  let year = date.getFullYear();
  let month = date.getMonth() + 1;
  let day = date.getDate();
  const hours = String(date.getHours()).padStart(2, "0");
  const minutes = String(date.getMinutes()).padStart(2, "0");
  const seconds = String(date.getSeconds()).padStart(2, "0");

  let completeDay = `${year}-${("0" + month).slice(-2)}-${("0" + day).slice(
    -2
  )} ${hours}:${minutes}:${seconds}`;
  return completeDay;
}
